package com.neiquan.neiquandemo.http;


import com.alibaba.fastjson.JSON;
import com.neiquan.neiquandemo.appliction.MyApplication;
import com.neiquan.neiquandemo.entity.User;

import net.neiquan.okhttp.NetCallBack;
import net.neiquan.okhttp.OkHttpUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * Description
 * Author by wangHaitao(a758277560@gmail.com)
 * Created  on 2015/12/picture1.
 * Version picture1.0
 */
public class NetUtils {

    /**
     * pageSize
     */
    public static int PAGE_SIZE = 10;

    private static NetUtils single = null;

    // 静态工厂方法
    public static NetUtils getInstance() {
        if (single == null) {
            single = new NetUtils();
        }
        return single;
    }

    public void norPost(String url, Object object, final NetCallBack callback, final Class classType) {
        OkHttpUtils.getInstance().postJsonAnsy(url, JSON.toJSONString(object), callback, classType);
    }

    public void norPost(String url, Map<String, Object> map, final NetCallBack callback, final Class classType) {
        if (map == null) {
            map = new HashMap<String, Object>();
        }
        User user = MyApplication.getInstance().user;
        if (user != null) {
            map.put("userid",user.getUser().getId());
            map.put("token",user.getToken());
        }
        // map.put("deviceType", 0+""); // 拼接userid
        OkHttpUtils.getInstance().postJsonAnsy(url, map, callback, classType);
    }

    public void norPostUser(String url, Map<String, Object> map, final NetCallBack callback, final Class classType) {
        if (map == null) {
            map = new HashMap<String, Object>();
        }
        if (MyApplication.getInstance().isLogin()) {
            map.put("token", MyApplication.getInstance().user.getToken()); // 拼接userid
        }
        //map.put("deviceType", 0); // 拼接userid
        OkHttpUtils.getInstance().postJsonAnsy(url, map, callback, classType);
        //OkHttpUtils.getInstance().SetSessionOutCls(WelcomeActivity.class);
    }

    /**
     * 登录
     * @param phone
     * @param password(不小于6位,不大于20位)
     * @param equi_type（登录设备类型0 Android,1 IOS,2 微信）
     * @param callback
     * @param classType
     */
    public void login(String phone, String password, String equi_type, String registId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("phone", phone);
        params.put("password", password);
        params.put("equi_type", equi_type);
        params.put("registId", registId);
        norPost(APPURL.LOGIN, params, callback, classType);
    }
    /**
     * 注册
     * <p>
     * phone	[必选]手机号
     * pushType	[必选]手机类型1ios2安卓
     * verCode	[必选]验证码
     * pushtoken	[必选]推送设备号
     * password	[必选]密码
     */
    public void userRegist(String phone, String password, String idenCode, String district, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("phone", phone);
        params.put("password", password);
        params.put("idenCode", idenCode);
        params.put("district", district);
        norPost(APPURL.REGIST, params, callback, classType);
    }
    /**
     * 验证码
     * phone
     * 0	注册
     1	忘记密码
     */
    public void getCaptcha(String phone, String whoNeedIdenCode, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("phone", phone);
        params.put("whoNeedIdenCode", whoNeedIdenCode);
        norPost(APPURL.CAPTCHA, params, callback, classType);
    }
    /**
     * 修改密码
     * @param phone
     * @param firstPassword
     * @param secondPassword
     * @param idenCode
     * @param callback
     * @param classType
     */
    public void editPwd(String phone, String firstPassword, String secondPassword, String idenCode, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("phone", phone);
        params.put("firstPassword", firstPassword);
        params.put("secondPassword", secondPassword);
        params.put("idenCode", idenCode);
        norPost(APPURL.EDIT_PWD, params, callback, classType);
    }

    /**
     * 首页正在热播
     * @param callback
     * @param classType
     */
    public void homePageData(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Home_PageData, params, callback, classType);
    }

    /**
     * 首页即将上映
     * @param callback
     * @param classType
     */
    public void homeSoonData(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Home_SoonData, params, callback, classType);
    }

    /**
     * 名人大佬
     * @param callback
     * @param classType
     */
    public void celebrityBoss(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Celebrity_Bosses, params, callback, classType);
    }

    /**
     * 排行榜
     * @param pageNo
     * @param pagesize
     * @param type
     * @param callback
     * @param classType
     */
    public void rankingList(String pageNo, String pagesize, String type, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        params.put("type", type);
        norPost(APPURL.Ranking_List, params, callback, classType);
    }

    /**
     * 精彩专题
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void goodSubject(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Good_Subject, params, callback, classType);
    }

    /**
     * 频道列表
     * @param pageNo
     * @param pagesize
     * @param type
     * @param callback
     * @param classType
     */
    public void channelList(String pageNo, String pagesize, String type, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        params.put("type", type);
        norPost(APPURL.Channel_List, params, callback, classType);
    }

    /**
     *
     * @param teacherId
     * @param callback
     * @param classType
     */
    public void teacherDetail(String teacherId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("teacherId", teacherId);
        norPost(APPURL.Teacher_Detail, params, callback, classType);
    }

    /**
     * 教师课程详情
     * @param teacherId
     * @param callback
     * @param classType
     */
    public void teacherCourseDetail(String teacherId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("teacherId", teacherId);
        norPost(APPURL.Teacher_Course_Detail, params, callback, classType);
    }

    /**
     * 教师活动详情
     * @param teacherId
     * @param callback
     * @param classType
     */
    public void teacherActivityDetail(String teacherId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("teacherId", teacherId);
        norPost(APPURL.Teacher_Activity_Detail, params, callback, classType);
    }

    /**
     * 课程-教程信息
     * @param courseId
     * @param callback
     * @param classType
     */
    public void courseDetail(String courseId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("courseId", courseId);
        norPost(APPURL.Course_Detail, params, callback, classType);
    }

    /**
     * 课程-视频目录
     * @param courseId
     * @param callback
     * @param classType
     */
    public void courseVideos(String courseId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("courseId", courseId);
        norPost(APPURL.Course_Videos, params, callback, classType);
    }

    /**
     * 课程-教师详情
     * @param courseId
     * @param callback
     * @param classType
     */
    public void courseTeacherDetail(String courseId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("courseId", courseId);
        norPost(APPURL.Course_Teacher_Detail, params, callback, classType);
    }

    /**
     * 课程-推荐
     * @param courseId
     * @param callback
     * @param classType
     */
    public void courseRecor(String courseId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("courseId", courseId);
        norPost(APPURL.Course_Recor, params, callback, classType);
    }


    /**
     * 首页-某个精彩专题
     * @param subjectId
     * @param callback
     * @param classType
     */
    public void subjectDetail(String subjectId, String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("subjectId", subjectId);
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Subject_Detail, params, callback, classType);
    }

    /**
     * 注册-省市
     * @param callback
     * @param classType
     */
    public void placeProCity(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Place_ProCity, params, callback, classType);
    }

    /**
     * 注册-市区
     * @param districtId
     * @param callback
     * @param classType
     */
    public void placeDetail(String districtId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("districtId", districtId);
        norPost(APPURL.Place_Detail, params, callback, classType);
    }

    /**
     * 频道-某个具体分类
     * @param pageNo
     * @param pagesize
     * @param type
     * @param channelId
     * @param callback
     * @param classType
     */
    public void channelDetail(String pageNo, String pagesize, String type, String channelId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        params.put("type", type);
        params.put("channelId", channelId);
        norPost(APPURL.Channel_Detail, params, callback, classType);
    }

    /**
     * 我的-个人资料
      * @param callback
     * @param classType
     */
    public void personalInfo(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Personal_Info, params, callback, classType);
    }

    /**
     * 我的-修改头像
     * @param picSaveUrl
     * @param callback
     * @param classType
     */
    public void updateHead(String picSaveUrl, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("picSaveUrl", picSaveUrl);
        norPost(APPURL.Updatae_Head, params, callback, classType);
    }

    /**
     * 我的-修改性别
     * @param gender
     * @param callback
     * @param classType
     */
    public void updateSex(String gender, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("gender", gender);
        norPost(APPURL.Updatae_Sex, params, callback, classType);
    }

    /**
     * 我的-修改星座
     * @param zodiac
     * @param callback
     * @param classType
     */
    public void updateStar(String zodiac, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("zodiac", zodiac);
        norPost(APPURL.Updatae_Star, params, callback, classType);
    }

    /**
     * 我的收藏
     * @param callback
     * @param classType
     */
    public void meCollect(String pageNo, String pageSize, String type, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pageSize", pageSize);
        params.put("type", type);
        norPost(APPURL.Me_Collect, params, callback, classType);
    }

    /**
     * 收藏编辑
     * @param collectType
     * @param collectTypeId
     * @param callback
     * @param classType
     */
    public void collectEdit(String collectType, String collectTypeId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("collectType", collectType);
        params.put("collectTypeIds", collectTypeId);
        norPost(APPURL.Collect_Edit, params, callback, classType);
    }

    /**
     * 播放记录
     * @param callback
     * @param classType
     */
    public void playRecord(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Play_Record, params, callback, classType);
    }

    /**
     * 删除播放记录
     * @param playRecordId
     * @param callback
     * @param classType
     */
    public void editRecord(String playRecordId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("playRecordId", playRecordId);
        norPost(APPURL.Edit_Record, params, callback, classType);
    }

    /**
     * 我的参与
     * @param pageNo
     * @param pageSize
     * @param callback
     * @param classType
     */
    public void meParticip(String pageNo, String pageSize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
//        params.put("manType", manType);
        params.put("pageNo", pageNo);
        params.put("pagesize", pageSize);
        norPost(APPURL.Me_Particip, params, callback, classType);
    }

    /**
     * 我的参与详情
     * @param activityId
     * @param callback
     * @param classType
     */
    public void participDetail(String activityId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("activityId", activityId);
        norPost(APPURL.Particip_Detail, params, callback, classType);
    }

    /**
     * 课程-视频
     * @param videoId
     * @param callback
     * @param classType
     */
    public void courseVideo(String videoId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("videoId", videoId);
        norPost(APPURL.Course_Video, params, callback, classType);
    }

    /**
     * 我的-发起的教程
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void requestList(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Request_List, params, callback, classType);
    }

    /**
     * 我的-发起的教程详情
     * @param callback
     * @param classType
     */
    public void requestDetail(String id, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("courseId", id);
        norPost(APPURL.Request_Dtail, params, callback, classType);
    }

    /**
     * 线下活动
     * @param pageNo
     * @param pagesize
     * @param type
     * @param callback
     * @param classType
     */
    public void lineActiviy(String pageNo, String pagesize, String type, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        params.put("type", type);
        norPost(APPURL.Line_Activiy, params, callback, classType);
    }

    /**
     * 线下活动-删除评论
     * @param commentId
     * @param callback
     * @param classType
     */
    public void editComment(String commentId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("commentId", commentId);
        norPost(APPURL.Edit_Comment, params, callback, classType);
    }

    /**
     * 点赞和倒赞
     * @param type
     * @param courseId
     * @param callback
     * @param classType
     */
    public void praiseOrNot(String type, String likedId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("type", type);
        params.put("likedId", likedId);
        norPost(APPURL.PriaseOrNot, params, callback, classType);
    }

    /**
     * 我的讲师收益
     * @param callback
     * @param classType
     */
    public void teacherIncome(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Teacher_Income, params, callback, classType);
    }

    /**
     * 我的讲师-已录制视频
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void teacherRecordVideo(String pageNo, String pagesize, String type, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        params.put("type", type);
        norPost(APPURL.Teacher_Record_Video, params, callback, classType);
    }

    /**
     * 我的(讲师)-讲师收益-正在预订的相关线下活动
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void teacherAboutActiviy(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Teacher_About_Activiy, params, callback, classType);
    }

    /**
     * 我的积分
     * @param callback
     * @param classType
     */
    public void mineIntergra(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Mine_Intergra, params, callback, classType);
    }

    /**
     * 我的-积分-签到
     * @param callback
     * @param classType
     */
    public void mineIntergraSign(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Mine_Sign, params, callback, classType);
    }

    /**
     * 我的-积分记录
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void intergraDetail(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Intergra_Detail, params, callback, classType);
    }

    /***
     * 我的-设置-修改密码
     * @param password
     * @param newPassword
     * @param rePassword
     * @param callback
     * @param classType
     */
    public void updatePwd(String password, String newPassword, String rePassword, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("password", password);
        params.put("newPassword", newPassword);
        params.put("rePassword", rePassword);
        norPost(APPURL.Update_Pwd, params, callback, classType);
    }

    /**
     * 我的-意见反馈
     * @param content
     * @param phoneNum
     * @param callback
     * @param classType
     */
    public void suggestBack(String content, String phoneNum, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("content", content);
        params.put("phoneNum", phoneNum);
        norPost(APPURL.Suggest_Callback, params, callback, classType);
    }

    /**
     * 我的-系统消息
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void systemInfo(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.System_Info, params, callback, classType);
    }

    /**
     * 系统消息详情
     * @param systemInfoId
     * @param callback
     * @param classType
     */
    public void systemDetail(String systemInfoId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("systemInfoId", systemInfoId);
        norPost(APPURL.System_Detail, params, callback, classType);
    }

    /**
     * 我的优惠券
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void mineCoupon(String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Mine_Coupon, params, callback, classType);
    }

    /**
     * 评论列表
     * @param commed_id
     * @param pageNo
     * @param pagesize
     * @param callback
     * @param classType
     */
    public void commentList(String commed_id, String pageNo, String pagesize, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("commed_id", commed_id);
        params.put("pageNo", pageNo);
        params.put("pagesize", pagesize);
        norPost(APPURL.Comment_List, params, callback, classType);
    }

    /**
     * 添加评论
     * @param commed_id
     * @param commed_type
     * @param comm_content
     * @param callback
     * @param classType
     */
    public void addComment(String commed_id, String commed_type, String comm_content, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("commed_id", commed_id);
        params.put("commed_type", commed_type);
        params.put("comm_content", comm_content);
        norPost(APPURL.Add_Comment, params, callback, classType);
    }

    /**
     * 收藏
     * @param collectTypeId
     * @param callback
     * @param classType
     */
    public void collect(String type, String collectTypeId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("type", type);
        params.put("collectId", collectTypeId);
        norPost(APPURL.Collect, params, callback, classType);
    }

    /**
     * 关注
     * @param followedId
     * @param callback
     * @param classType
     */
    public void followed(String followedId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("followedId", followedId);
        norPost(APPURL.Followed, params, callback, classType);
    }

    /**
     * 获得公共求课程列表
     * @param page
     * @param size
     * @param type
     * @param callback
     * @param classType
     */
    public void allRequest(int page, int size, int type, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("page", page);
        params.put("size", size);
        params.put("type", type);
        norPost(APPURL.All_Request, params, callback, classType);
    }

    /**
     * 点击求课程-获得频道列表
     * @param callback
     * @param classType
     */
    public void twoLevels(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Two_Levels, params, callback, classType);
    }

    /**
     * 添加一个求课程信息
     * @param channelId
     * @param teacherId
     * @param coursename
     * @param question
     * @param callback
     * @param classType
     */
    public void createCourse(String channelId, String teacherId, String coursename, String question, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("channelId", channelId);
        params.put("teacherId", teacherId);
        params.put("coursename", coursename);
        params.put("question", question);
        norPost(APPURL.Create_Course, params, callback, classType);
    }

    /**
     * 用户对求课程投票
     * @param requestId
     * @param callback
     * @param classType
     */
    public void vote(String requestId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("requestId", requestId);
        norPost(APPURL.Vote, params, callback, classType);
    }

    /**
     * 第三方登陆
     * @param type
     * @param ssoId
     * @param ssoName
     * @param sex
     * @param phoneType
     * @param registId
     * @param address
     * @param picUrl
     * @param callback
     * @param classType
     */
    public void wxLogin(int type, String ssoId, String ssoName, int sex, int phoneType, String registId, String address, String picUrl, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("type", type);
        params.put("ssoId", ssoId);
        params.put("ssoName", ssoName);
        params.put("sex", sex);
        params.put("phoneType", phoneType);
        params.put("registId", registId);
        params.put("address", address);
        params.put("picUrl", picUrl);
        norPost(APPURL.WX_Login, params, callback, classType);
    }

    /**
     * 获得本周榜首
     * @param callback
     * @param classType
     */
    public void voteTop(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Vote_Top, params, callback, classType);
    }

    /**
     * 点击立即拥有获取订单(直接跳转至支付窗口)
     * @param videoId
     * @param payType
     * @param useCoupon
     * @param couponId
     * @param callback
     * @param classType
     */
    public void willPay(String videoId, String payType, String useCoupon, String couponId, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("videoId", videoId);
        params.put("payType", payType);
        params.put("useCoupon", useCoupon);
        params.put("couponId", couponId);
        norPost(APPURL.Will_Pay, params, callback, classType);
    }

    /**
     * gender，district，username   不能为空
     * @param gender
     * @param district
     * @param username
     * @param picSaveUrl
     * @param birthDay
     * @param job
     * @param zodiac
     * @param callback
     * @param classType
     */
    public void updateInfo(int gender, String district, String username, String picSaveUrl, long birthDay, String job, String zodiac, final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("gender", gender);
        params.put("district", district);
        params.put("username", username);
        params.put("picSaveUrl", picSaveUrl);
        params.put("birthDay", birthDay);
        params.put("job", job);
        params.put("zodiac", zodiac);
        norPost(APPURL.Update_Info, params, callback, classType);
    }

    /**
     * 发现-轮播图
     * @param callback
     * @param classType
     */
    public void findBanner(final NetCallBack callback, final Class classType) {
        Map<String, Object> params = new HashMap<String, Object>();
        norPost(APPURL.Find_Banner, params, callback, classType);
    }

}
